package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.Client;

public class BankService {

	public static void addClient(Bank bank, Client client) {
		bank.addClient(client);
	}

	public static void printBalance(Bank bank) {
		for (Client client : bank.getClients()) {
			if (client != null) {
				System.out.println(client.toString() + " Balance: "
						+ client.getAccount().getBalance());
			}
		}
	}

	public static void printMaximumAmountToWithdraw(Bank bank) {
		for (Client client : bank.getClients()) {
			if (client != null) {
				System.out.println(client + "Max.amount to withdraw: "
						+ client.getAccount().maximumAmountToWithdraw());
			}
		}
	}
}
